/* 
 * File:   DiscardStrategyConjunction.h
 * Author: root
 *
 * Created on November 16, 2008, 6:41 PM
 */

#include "DiscardStrategy.h"
#include "StrategyCodec.h"

#ifndef _DISCARDSTRATEGYCOLLECTION_H
#define	_DISCARDSTRATEGYCOLLECTION_H

class DiscardStrategyCollection : public DiscardStrategy {
    
    DiscardStrategy* collection[AVAILABLE_DISCARD];
    int numStrategies;
    
public:
    
    virtual int getDecisionCertainty();
    
    DiscardStrategyCollection(DiscardStrategy** strategyGroup) 
    : DiscardStrategy(0), numStrategies(AVAILABLE_STRATEGIES[DISCARD]) 
    {
        for (int i = 0; i < numStrategies; i++) {
            collection[i] = strategyGroup[i];
        }
    }
    
    virtual Strategy* getActiveInstance(int) { return NULL; }
    
    virtual void setExecutionParameter(int, int) {}
    
    virtual void opponentMove(int, const Move&);
    virtual int pickDiscard(CCardStack*, bool, const GameState*);
    
    virtual ~DiscardStrategyCollection() {
        for (int i = 0; i < numStrategies; i++) {
            delete collection[i];
        }
    }
    
};

#endif	/* _DISCARDSTRATEGYCOLLECTION_H */

